package net.maku.module.service;

import jakarta.servlet.http.HttpServletRequest;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.mybatis.service.BaseService;
import net.maku.module.entity.AgCategoryEntity;
import net.maku.module.entity.AgContent;
import net.maku.module.entity.AgContentLogEntity;
import net.maku.module.vo.AgContentCombined;

import java.util.List;
import java.util.Map;

public interface AgContentService extends BaseService<AgContent> {
    int deleteBatch(List<Integer> ids);

    PageResult selectContent(Integer templateType, String title, Integer pageNum,
                             Integer pageSize,Integer id,Integer websiteId,String approveState) throws Exception;

    void updateFixedRate(long interval);

    int saveContent(AgContentCombined agContentCombined);

    int updateContent(AgContentCombined agContentCombined);


    List<AgContentCombined> selectShowContent(Integer websiteId);


    PageResult selectNotShowContent(Integer pageNum, Integer pageSize,Integer websiteId);

    int updateShow(Integer id,Integer show);

    PageResult<AgContentCombined> searchFull(String text, Integer pageNum, Integer pageSize,Integer websiteId);
    //封装的插入日志
    void insertLog(AgContentLogEntity agContentLogEntity);

    PageResult<AgContentLogEntity> selectContentLogs(Integer type, Integer success, Integer pageNum, Integer pageSize);

    List<AgContentCombined> getHomeContent();

    List<AgContentCombined> getAnnouncement();

    Map<String, Object> selectContentByIdWithPage(HttpServletRequest request,Integer id, Integer type, Integer webSiteId, int page, int pageSize);

    AgContentCombined queryById(Integer id);

    AgContentCombined getSortIsOne(Integer id);

    void updateStatusByContentId(AgContentCombined agContentCombined);
}
